#ifndef ROLEMANAGE_H
#define ROLEMANAGE_H

#include <QWidget>
#include <QToolButton>
#include <QPaintEvent>
#include <QPainter>
#include "blldataflow.h"
#include "sqlhelper.h"
#include "commonfunction.h"
#include "shadow.h"

namespace Ui {
class RoleModify;
}

class RoleModify : public QWidget
{
    Q_OBJECT

public:
    explicit RoleModify(QWidget *parent = nullptr);
    ~RoleModify();
    void show();

private slots:
    void setLineEditRoleName(QString name);

    //依据权限参数更新当前权限
    void updatePermissionListWidget(int permission);

    void on_btnConfirmModifyRole_clicked();
    void on_btnCancelModifyRole_clicked();
    void on_btnClose_clicked();

    void retranslateUiSlot();

private:
    void initWidget();

protected:
    void paintEvent(QPaintEvent *event);

private:
    Ui::RoleModify *ui;
    BllDataFlow * bdf;
    SqlHelper * sqlHelper;
    QToolButton * btnModifyRole;
};

#endif // ROLEMANAGE_H
